import org.example.dao.register;
import org.example.model.Account;
import org.junit.Test;

import java.util.Scanner;

public class App {
    Scanner sc=new Scanner(System.in);
    public void zhuce(){
        System.out.println("欢迎使用用户注册系统");
        Account account = new Account();
        System.out.println("请输入您要注册的用户名:");
        String name=sc.nextLine();
        account.setName(name);
        if(!register.judge(account)){
        }else {
            System.out.println("请输入密码:");
            String password=sc.nextLine();
            account.setPassword(password);
            if (register.regist(account)){
                System.out.println("注册成功");
            }
        }
    }

    public static void main(String[] args) {
        App app = new App();
        app.zhuce();
    }

}
